package pikes.peak;

import java.util.HashMap;

import org.junit.Assert;
import org.junit.Test;

import pikes.peak.RequestIndependentProperty;
import pikes.peak.test.PikesPeakComponentTestCase;

public class ConstantObjectProviderTestCase extends PikesPeakComponentTestCase {

	@Test
	public void test() throws Exception {
		Object object = new Object();
		RequestIndependentProperty<Object> provider = new RequestIndependentProperty<Object>(object);
		Assert.assertEquals(object, provider.getValue(new HashMap(), pikesPeakRequest.getRequestContext()));
	}

	@Test
	public void testNull() throws Exception {
		RequestIndependentProperty<Object> provider = new RequestIndependentProperty<Object>(null);
		Assert.assertNull(provider.getValue(new HashMap(), pikesPeakRequest.getRequestContext()));
	}
}
